Skip to content

dir-core: keep the fold's sole Entra→EXO row ordinal in Output - #371

Merged
AdaWorldAPI merged 2 commits into
mainfrom
ccr-fd2682ed-sai06j
Nov 6, 2026
Merged

AdaWorldAPI merged 2 commits into
mainfrom
ccr-fd2682ed-sai06j

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

fold's cloud merge already decides, per Entra row, whether exactly one Exchange Online row names it. It then threw the row away, and Ruler::from_fold re-ran the same merge to recover it.

This PR keeps the row in Output::entra_mailbox: the EXO row ordinal, or NO_ROW when no row or several rows name the Entra id. A choice is never made. Ruler::from_fold now reads that field instead of merging a second time. The ix parameter is unused now; it stays in the signature (as _ix) so callers keep compiling.

Why: a consumer that binds a hybrid AD→Entra→EXO coordinate (lance-graph's ordinal-chain lab, follow-up to lance-graph #1962) used to need its own Entra→EXO lookup. That lookup was a second correspondence engine, and it goes away.

Behaviour change

None for existing fields. Output gains one public field. No code in OGAR or lance-graph builds Output with a struct literal (checked by grep), so nothing breaks.

Validation

  • ogar-az --test correspond: 18/18. run_encoded now compares entra_mailbox against a scalar linear scan on every fixture, including the randomized one.
  • Pinned cases: one mailbox → [0], two mailboxes → [NO_ROW], and a new mailbox_ordinal_does_not_cross_tenants (same external id in two bound tenants → [1, 0]).
  • Disable run: replacing sole(x) with a first match makes exchange_online_dangling_and_duplicate fail. The randomized fixture does not generate duplicate mailboxes, so the targeted test is the one that catches this.
  • cargo clippy -p ogar-dir-core -p ogar-az --all-targets -- -D warnings: clean. fmt: clean. ogar-dir-core and ogar-az suites: all green.

Merge this before the paired lance-graph PR, whose CI checks out OGAR main.


Generated by Claude Code

fold's cloud merge already decides, per Entra row, whether exactly one
Exchange Online row names it, then discarded the row. Output now keeps it
as entra_mailbox (NO_ROW for none or several), and Ruler::from_fold reads
it instead of running a second merge. Consumers binding a hybrid
AD->Entra->EXO coordinate no longer need their own Entra->EXO lookup.

The ogar-az suite checks the field against a scalar scan on every fixture,
including the randomized one, and pins the duplicate and cross-tenant cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XAqKMMJzKZrYnckXRC8x2U
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5398c20-cb9f-4104-9e75-b344f0b8bb23
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review November 6, 2026 06:28
@AdaWorldAPI
AdaWorldAPI merged commit 7e25c36 into main Nov 6, 2026
4 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T06:29:15.243244Z 455004b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants